import { _decorator, Component, director, game, Game, Node } from 'cc';
import { Entrance } from '../Entrance';
const { ccclass, property } = _decorator;
export class ModuleCenter {

    private static _frame = 0;

    public static initialize(comp:Entrance) {
        director.addPersistRootNode(comp.node);
        this.checkFrame();
    }

    private static async checkFrame() {
        await new Promise((s, f)=>{
            setTimeout(s, 1)
        })
        if (this._frame == 0) {
            console.warn("没有调用update")
        }

    }

    public static update(dt) {
        this._frame++;

    }

    public static lateUpdate(dt) {

    }

    
}




